# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=akonadiconsole
pkgver=20.04.3
pkgrel=0
arch="all !s390x !ppc64le !armhf !mips !mips64" # calendarsupport messagelib missing
url="https://kontact.kde.org/"
pkgdesc="Application for debugging Akonadi Resources"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="extra-cmake-modules qt5-qtbase-dev kcompletion-dev kconfig-dev kconfigwidgets-dev kdbusaddons-dev kdoctools-dev ki18n-dev kitemmodels-dev ktextwidgets-dev kwidgetsaddons-dev kxmlgui-dev kcrash-dev kcompletion-dev kitemviews-dev kio-dev akonadi-dev kcontacts-dev kcalendarcore-dev kmime-dev akonadi-contacts-dev calendarsupport-dev messagelib-dev libkdepim-dev akonadi-search-dev xapian-bindings"
checkdepends="xvfb-run"
source="https://download.kde.org/stable/release-service/$pkgver/src/akonadiconsole-$pkgver.tar.xz"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="5a27a92a67638831633f0020f92f9c64fdf95465977d90fd70ebfcdb383d11f2662e9e4987f1114aae3271dd1f6e5fb18b16e09eba76cc58edc834671245dd92  akonadiconsole-20.04.3.tar.xz"
